package com.yy.web.pm.billboard.mapper;

import com.yy.web.pm.billboard.domain.BillboardData;

import java.util.List;

import com.yy.web.pm.billboard.domain.Dto.BillboardDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface BillboardDataMapper {
    /**
     * delete by primary key
     *
     * @param id primaryKey
     * @return deleteCount
     */
    int deleteByPrimaryKey(Integer id);
    int deleteByPrimaryKeyShopId(Integer id);

    /**
     * insert record to table
     *
     * @param record the record
     * @return insert count
     */
    int insert(BillboardData record);

    /**
     * insert record to table selective
     *
     * @param record the record
     * @return insert count
     */
    int insertSelective(BillboardData record);

    /**
     * select by primary key
     *
     * @param id primary key
     * @return object by primary key
     */
    BillboardData selectByPrimaryKey(Integer id);

    /**
     * update record selective
     *
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKeySelective(BillboardData record);

    /**
     * update record
     *
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKey(BillboardData record);

    int updateBatch(List<BillboardData> list);

    int batchInsert(@Param("list") List<BillboardData> list);

    List<BillboardDto> selectBillBoardList(BillboardDto billboardDto,@Param("userIds") Long userIds);

    List<BillboardData> selectBillboardData(BillboardData billboardData);

    List<BillboardDto> selectBillboardDto(BillboardDto billboardDto);

    int updateByid(@Param("id") Long id);

    BillboardData selectShopById(@Param("id") Integer id);
}
